package com.ruoyi.flow.flow.workflow;

import com.ruoyi.flow.common.utils.SpringContextHolder;
import com.ruoyi.flow.flow.activity.FlowActivityService;
import com.ruoyi.flow.flow.definition.FlowDefinitionService;
import com.ruoyi.flow.flow.deployment.FlowDeploymentService;
import com.ruoyi.flow.flow.form.FlowFormService;
import com.ruoyi.flow.flow.identity.FlowIdentityService;
import com.ruoyi.flow.flow.instance.FlowInstanceService;
import com.ruoyi.flow.flow.model.FlowModelService;
import com.ruoyi.flow.flow.task.FlowTaskService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * 工作流服务接口门面类
 *
 * @Author: wtian
 * @Description:
 * @Date: Created in 16:44 2018/8/9
 * @Version: 1.0
 */

public class FlowService {
    private static final Logger LOGGER = LoggerFactory.getLogger(FlowService.class);

    public static final FlowActivityService activityService() {
        return SpringContextHolder.getBean(FlowActivityService.class);
    }

    public static final FlowDefinitionService definitionService() {
        return SpringContextHolder.getBean(FlowDefinitionService.class);
    }

    public static final FlowDeploymentService deploymentService() {
        return SpringContextHolder.getBean(FlowDeploymentService.class);
    }

    public static final FlowFormService formService() {
        return SpringContextHolder.getBean(FlowFormService.class);
    }

    public static final FlowIdentityService identityService() {
        return SpringContextHolder.getBean(FlowIdentityService.class);
    }

    public static final FlowInstanceService instanceService() {
        return SpringContextHolder.getBean(FlowInstanceService.class);
    }

    public static final FlowTaskService taskService() {
        return SpringContextHolder.getBean(FlowTaskService.class);
    }

    public static final FlowModelService modelService() {
        return SpringContextHolder.getBean(FlowModelService.class);
    }
}
